﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace mbine.todo.app
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        double nowWinWidth = 0;
        double nowWinHeight = 0;
        newItem newEntry;
        public MainWindow()
        {
            InitializeComponent();
            nowWinWidth = this.Width;
            nowWinHeight = this.Height;

            Init();
        }

        public void Init()
        {
            todoQuickLink1.NewItemShow += new EventHandler(todoQuickLink1_NewItemShow);
        }

        void todoQuickLink1_NewItemShow(object sender, EventArgs e)
        {
            newEntry = new newItem();
            bool? result = newEntry.ShowDialog();
            if (result.HasValue && result.Value)
            {
            }
        }

        private void Window_MouseDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        private void btnClose_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Shutdown();
        }

        private void btnMin_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Normal;
        }

        private void btnMax_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Maximized;
        }
    }
}
